//
//  LabelAndImageV.m
//  XGT
//
//  Created by  程 强 on 15/6/3.
//  Copyright (c) 2015年 Demon. All rights reserved.
//

#import "LabelAndImageV.h"
#import "JTCSM.h"
@implementation LabelAndImageV

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (id)initWithFrame:(CGRect)frame withLableText:(NSString *)LableText  imageName:(NSString *)imagename font:(CGFloat)font{
    self = [super initWithFrame:frame];
    if (self) {
        CGFloat width  = self.frame.size.width;
        CGFloat height = self.frame.size.height;
        
        UIImageView *photoImageV= [[UIImageView alloc]initWithFrame:CGRectMake(0,0,width,width )];
        photoImageV.image = [UIImage imageNamed:imagename];
        photoImageV.userInteractionEnabled = YES;
        [self addSubview:photoImageV];
        
        CGFloat X = photoImageV.frame.origin.x;
        CGFloat Y = photoImageV.frame.origin.y;
        UILabel *photoLbel = [UILabel initWithFrame:CGRectMake(X, Y+width, width, height-width) text:LableText font:font textAlignment:NSTextAlignmentCenter texcolor:RGBACOLOR(193, 193, 193, 1) backgroundColor:nil];
        [self addSubview:photoLbel];

        
    }
    return self;
}

@end
